#ifndef __SIGNALHANDLER_H__
#define __SIGNALHANDLER_H_
#include <stdexcept>
#include<iostream>
#include<stdlib.h>
#include<signal.h>
using std::runtime_error;

class SignalException : public runtime_error
{
public:
   SignalException(const std::string& _message)
      : std::runtime_error(_message){}
};

class SignalHandler {
		
	protected :
 		static bool flag;
	
	public:
		void setupSignalHandlers();
		static void exitSignalHandler(int _ignored);
		static void hiddenSignalHandler(int _ignored);
		static bool getFlag();
		static void setFlag(bool);
	
};
#endif


